package com.area.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 采用国家统一编码 五级
 * </p>
 *
 * @author WangPeiXi
 * @since 2022-05-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_area")
@ApiModel(value="SysArea对象", description="采用国家统一编码 五级")
public class SysArea extends Model<SysArea> {


    @ApiModelProperty(value = "记录唯一标识（地区编码，顶级编码为-1）")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "父标志,根节点的值为0")
    @TableField("pid")
    private String pid;

    @ApiModelProperty(value = "地区名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "地区类型；1：省份（包含直辖市、自治区、特别行政区）；2：市；3：区县")
    @TableField("level")
    private Integer level;

    @ApiModelProperty(value = "拼音")
    @TableField("pinyin")
    private String pinyin;


}
